const path = require('path')
// const API_URL = process.env.REACT_APP_API_URL
// const API_URL_PREFIX = process.env.REACT_APP_API_URL_PREFIX
// console.log('API_URL:', API_URL);
// console.log('API_URL_PREFIX:', API_URL_PREFIX);
// console.log('NODE_ENV-------------:', process.env.NODE_ENV, process.env.REACT_APP_ENV);

module.exports = {
  webpack: {
    alias: {
      '@': path.resolve(__dirname, 'src')
    }
  },
  devServer: {
    proxy: {
      '/v1_0': {
        target: 'http://geek.itheima.net',
        ws: true,
        changeOrigin: true,
        // pathRewrite: {
        // 	[`^${process.env.REACT_APP_API_URL_PREFIX}`]: ''
        // }
      },
    },
  },
}